home *** CD-ROM | disk | FTP | other *** search
- /*
- DictMaker v1.0
- Written By: E-HACK (god@wilter.com)
-
- Copyright ⌐ 1997 Wiltered Fire
- All Rights Reserved.
- */
-
-
-
- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
-
- static char *letters[] = { "a","b","c","d","e","f","g","h","i","j","k","l","m",
- "n","o","p","q","r","s","t","u","v","w","x","y","z","A",
- "B","C","D","E","F","G","H","I","J","K","L","M","N","O",
- "P","Q","R","S","T","U","V","W","X","Y","Z","0","1","2",
- "3","4","5","6","7","8","9" };
-
- main()
- {
- int i, chars, c, passwords, d;
- char *letter, *filename;
- FILE *fp;
- time_t t;
-
- srand((unsigned) time(&t));
-
- printf("\nDictMaker v1.0\nWritten By: E-HACK\n\n");
-
- printf("Output file: ");
- scanf("%s", filename);
-
- printf("Number of characters: ");
- scanf("%d", &chars);
-
- if(chars <= 1) {
- printf("Not enough characters!");
- return(0);
- }
-
- printf("Number of passwords: ");
- scanf("%d", &passwords);
- d = 1;
- fp = fopen(filename, "w");
- fflush(fp);
- if(fp == NULL) {
- printf("\nUnable to write to %s", filename);
- return(0);
- }
- printf("\nCreating %s with %d passwords", filename, passwords);
- if(passwords >= 20000) { printf("...\nThis might take a while"); }
-
-
- while(d <= passwords)
- {
- d++;
-
- c = 1;
- while(c <= chars)
- {
- c++;
- i = rand() % 62;
- letter = letters[i];
- fprintf(fp, "%s", letter);
- }
- fputs("\n", fp);
- }
- fclose(fp);
- printf("\n\nDone writing %d passwords to %s\a", passwords, filename);
- return(0);
- }
-